home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.display.Sprite;
- import mx.binding.FunctionReturnWatcher;
- import mx.binding.IWatcherSetupUtil;
- import mx.binding.PropertyWatcher;
- import mx.binding.RepeaterItemWatcher;
- import mx.binding.Watcher;
- import mx.core.IFlexModuleFactory;
- import views.BrowseYearTab;
-
- public class _views_BrowseYearTabWatcherSetupUtil extends Sprite implements IWatcherSetupUtil
- {
- public function _views_BrowseYearTabWatcherSetupUtil()
- {
- super();
- }
-
- public static function init(param1:IFlexModuleFactory) : void
- {
- BrowseYearTab.watcherSetupUtil = new _views_BrowseYearTabWatcherSetupUtil();
- }
-
- public function setup(param1:Object, param2:Function, param3:Array, param4:Array) : void
- {
- var tempWatcher:Watcher = null;
- var target:Object = param1;
- var propertyGetter:Function = param2;
- var bindings:Array = param3;
- var watchers:Array = param4;
- watchers[1] = new PropertyWatcher("presentationModel",{"propertyChange":true});
- watchers[2] = new PropertyWatcher("years",{"propertyChange":true});
- watchers[3] = new PropertyWatcher("yearsRpt",{"propertyChange":true});
- watchers[4] = new PropertyWatcher("dataProvider",{"collectionChange":true});
- watchers[5] = new RepeaterItemWatcher(watchers[4]);
- watchers[7] = new PropertyWatcher("issue",null);
- watchers[8] = new FunctionReturnWatcher("getItemAt",target,function():Array
- {
- return [0];
- },null);
- watchers[9] = new PropertyWatcher("file",null);
- watchers[6] = new PropertyWatcher("value",null);
- watchers[1].addListener(bindings[0]);
- watchers[1].propertyGetter = propertyGetter;
- watchers[1].updateParent(target);
- watchers[2].addListener(bindings[0]);
- watchers[1].addChild(watchers[2]);
- tempWatcher = watchers[3];
- tempWatcher.addListener(bindings[2]);
- tempWatcher.addListener(bindings[1]);
- watchers[3].propertyGetter = propertyGetter;
- watchers[3].updateParent(target);
- tempWatcher = watchers[4];
- tempWatcher.addListener(bindings[2]);
- tempWatcher.addListener(bindings[1]);
- watchers[3].addChild(watchers[4]);
- watchers[4].addChild(watchers[5]);
- watchers[7].addListener(bindings[2]);
- watchers[5].addChild(watchers[7]);
- watchers[8].addListener(bindings[2]);
- watchers[8].parentWatcher = watchers[7];
- watchers[7].addChild(watchers[8]);
- watchers[9].addListener(bindings[2]);
- watchers[8].addChild(watchers[9]);
- tempWatcher = watchers[6];
- tempWatcher.addListener(bindings[2]);
- tempWatcher.addListener(bindings[1]);
- watchers[5].addChild(watchers[6]);
- bindings[0].uiComponentWatcher = 1;
- bindings[0].execute();
- bindings[1].uiComponentWatcher = 3;
- bindings[1].execute();
- bindings[2].uiComponentWatcher = 3;
- bindings[2].execute();
- }
- }
- }
-
-